using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class DiscountSetting
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _DiscountType;

		public string DiscountType
		{
			get { return _DiscountType; }
			set { _DiscountType = value; }
		}

		private int? _VisitNumber;

		public int? VisitNumber
		{
			get { return _VisitNumber; }
			set { _VisitNumber = value; }
		}

		private Double? _PayTotal;

		public Double? PayTotal
		{
			get { return _PayTotal; }
			set { _PayTotal = value; }
		}

		private DateTime? _Holiday;

		public DateTime? Holiday
		{
			get { return _Holiday; }
			set { _Holiday = value; }
		}

		private Double? _DiscountMoney;

		public Double? DiscountMoney
		{
			get { return _DiscountMoney; }
			set { _DiscountMoney = value; }
		}

		private Double? _DiscountRate;

		public Double? DiscountRate
		{
			get { return _DiscountRate; }
			set { _DiscountRate = value; }
		}

		private string _IsUse;

		public string IsUse
		{
			get { return _IsUse; }
			set { _IsUse = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public DiscountSetting()
		{ }

		public DiscountSetting(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string DiscountType,int? VisitNumber,Double? PayTotal,DateTime? Holiday,Double? DiscountMoney,Double? DiscountRate,string IsUse,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.DiscountType = DiscountType;
			this.VisitNumber = VisitNumber;
			this.PayTotal = PayTotal;
			this.Holiday = Holiday;
			this.DiscountMoney = DiscountMoney;
			this.DiscountRate = DiscountRate;
			this.IsUse = IsUse;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",DiscountType = " + DiscountType + ",VisitNumber = " + VisitNumber.ToString() + ",PayTotal = " + PayTotal.ToString() + ",Holiday = " + Holiday.ToString() + ",DiscountMoney = " + DiscountMoney.ToString() + ",DiscountRate = " + DiscountRate.ToString() + ",IsUse = " + IsUse + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<DiscountSetting>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<DiscountSetting> Membres
			int System.Collections.Generic.IComparer<DiscountSetting>.Compare(DiscountSetting x, DiscountSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class DiscountTypeComparer : System.Collections.Generic.IComparer<DiscountSetting>
		{
			public SorterMode SorterMode;
			public DiscountTypeComparer()
			{ }
			public DiscountTypeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<DiscountSetting> Membres
			int System.Collections.Generic.IComparer<DiscountSetting>.Compare(DiscountSetting x, DiscountSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.DiscountType.CompareTo(x.DiscountType);
				}
				else
				{
					return x.DiscountType.CompareTo(y.DiscountType);
				}
			}
			#endregion
		}
		public class IsUseComparer : System.Collections.Generic.IComparer<DiscountSetting>
		{
			public SorterMode SorterMode;
			public IsUseComparer()
			{ }
			public IsUseComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<DiscountSetting> Membres
			int System.Collections.Generic.IComparer<DiscountSetting>.Compare(DiscountSetting x, DiscountSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsUse.CompareTo(x.IsUse);
				}
				else
				{
					return x.IsUse.CompareTo(y.IsUse);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<DiscountSetting>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<DiscountSetting> Membres
			int System.Collections.Generic.IComparer<DiscountSetting>.Compare(DiscountSetting x, DiscountSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
